# -*- coding: utf-8 -*-
# @Time: 2021/8/13 17:20
# @File: problem-705.py
# @DESC: https://leetcode-cn.com/problems/design-hashset/

# 哈希集合设计

class MyHashSet:

    def __init__(self):
        self.keys = list(range(10**6))
        """
        Initialize your data structure here.
        """

    def add(self, key: int) -> None:
        print(len(self.keys))
        self.keys[key] = 1


    def remove(self, key: int) -> None:
        self.keys[key] = 0

    def contains(self, key: int) -> bool:
        """
        Returns true if this set contains the specified element
        """
        return False if self.keys[key]==0 else True
key = 1
obj = MyHashSet()
obj.add(key)
# obj.remove(key)
param_3 = obj.contains(key)

print(param_3)

